package com.lyxs916.appbaselibrary.core.fragment;

import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;

import com.lyxs916.appbaselibrary.core.iview.BaseSwipeView;
import com.lyxs916.appbaselibrary.core.presenter.BasePresenter;

/**
 * 说明:下拉刷新Fragment基类
 * 作者： 杨阳; 创建于：  2017-06-14  15:26
 */
public abstract class BaseRefreshFragment<V extends BaseSwipeView, P extends BasePresenter<V>> extends BaseMvpFragment<V, P>
        implements BaseSwipeView {

    public SwipeRefreshLayout swipe;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        swipe = getSwipeRefreshLayout();
        if (swipe != null) {
            swipe.setOnRefreshListener(this);
        }

    }
}
